-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std: Stabilize the thread_local_const_init
feature
#91355
Merged
bors
merged 1 commit into
rust-lang:master
from
alexcrichton:stabilize-thread-local-const
Dec 5, 2021
Merged
std: Stabilize the thread_local_const_init
feature
#91355
bors
merged 1 commit into
rust-lang:master
from
alexcrichton:stabilize-thread-local-const
Dec 5, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit is intended to follow the stabilization disposition of the FCP that has now finished in rust-lang#84223. This stabilizes the ability to flag thread local initializers as `const` expressions which enables the macro to generate more efficient code for accessing it, notably removing runtime checks for initialization. More information can also be found in rust-lang#84223 as well as the tests where the feature usage was removed in this PR. Closes rust-lang#84223
(rust-highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Nov 29, 2021
3 tasks
apiraino
added
the
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
label
Dec 1, 2021
@bors r+ |
📌 Commit a0c9597 has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Dec 4, 2021
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Dec 5, 2021
…askrgr Rollup of 6 pull requests Successful merges: - rust-lang#89642 (environ on macos uses directly libc which has the correct signature.) - rust-lang#90022 (Explain why `Self` is invalid in generic parameters) - rust-lang#90023 (Postpone the evaluation of constant expressions that depend on inference variables) - rust-lang#91215 (Implement VecDeque::retain_mut) - rust-lang#91355 (std: Stabilize the `thread_local_const_init` feature) - rust-lang#91528 (LLVM support .insn directive) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
vext01
added a commit
to vext01/yk_pv
that referenced
this pull request
Dec 8, 2021
hrxi
added a commit
to hrxi/tracing
that referenced
this pull request
Mar 18, 2022
Probably can't be included any time soon, as this requires Rust 1.59. rust-lang/rust#91355 (comment)
hrxi
added a commit
to hrxi/tracing
that referenced
this pull request
Mar 18, 2022
These don't require an initialization check on every access, which should at least be useful for the `CURRENT_STATE` `thread_local!` in `tracing-core`. Probably can't be included any time soon, as this requires Rust 1.59: rust-lang/rust#91355 (comment).
cuviper
added a commit
to cuviper/rayon
that referenced
this pull request
Feb 27, 2023
This enables more efficient code -- stabilized in rust-lang/rust#91355.
bors bot
added a commit
to rayon-rs/rayon
that referenced
this pull request
Feb 27, 2023
1027: Use const-TLS for the `WorkerThread` pointer (MSRV 1.59) r=cuviper a=cuviper This enables more efficient code -- stabilized in rust-lang/rust#91355. Co-authored-by: Josh Stone <cuviper@gmail.com>
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Apr 28, 2023
…d, r=thomcc Document `const {}` syntax for `std::thread_local`. It exists and is pretty cool. More people should use it. It was added in rust-lang#83416 and stabilized in rust-lang#91355 with the tracking issue rust-lang#84223.
This was referenced Jan 7, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit is intended to follow the stabilization disposition of the
FCP that has now finished in #84223. This stabilizes the ability to flag
thread local initializers as
const
expressions which enables the macroto generate more efficient code for accessing it, notably removing
runtime checks for initialization.
More information can also be found in #84223 as well as the tests where
the feature usage was removed in this PR.
Closes #84223